package com.study.security.core;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author LiYongKui
 * @version 1.0
 * @date 2021/4/7 10:20
 */
@Configuration
public class SecutityCoreConfig {

    /**
     * 自定义密码认证
     */
    @Bean
    public PasswordEncoder getPasswordEncoder(){
        /**
         * encode 加密
         * matches 是否匹配
         */
        return new BCryptPasswordEncoder();
    }
}
